﻿<sample:DemoView x:Class="Samples.Modules.ProgressBar.Views.ProgressBarView"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure"
                 xmlns:Control="clr-namespace:WPFDataEditors.ProgressBar.Control;assembly=WPFDataEditors"
                 Title="ProgressBar">
   <Grid>
      <Grid.RowDefinitions>
         <RowDefinition Height="Auto" />
         <RowDefinition Height="Auto" />
         <RowDefinition Height="*" />
      </Grid.RowDefinitions>
      <GroupBox  Grid.Row="1" Margin="5">
            <GroupBox.Header>
                <TextBlock Text="Features:" FontSize="16" FontWeight="Bold" Foreground="DarkBlue"/>
            </GroupBox.Header>
            <StackPanel Margin="5" HorizontalAlignment="Left">
                <StackPanel.Resources>
                    <Style TargetType="TextBlock">
                        <Setter Property="Margin" Value="5"/>
                        <Setter Property="Foreground" Value="DarkBlue"/>
                    </Style>
                </StackPanel.Resources>
                <StackPanel>
                    <StackPanel Margin="3" Orientation="Horizontal">
                        <TextBlock VerticalAlignment="Center">ProgressBar Type:</TextBlock>
                        <ComboBox x:Name="cmbProgressBarType" SelectedIndex="4" MinWidth="100">
                            <ComboBoxItem Content="None"/>
                            <ComboBoxItem Content="Content"/>
                            <ComboBoxItem Content="Value"/>
                            <ComboBoxItem Content="Ratio"/>
                            <ComboBoxItem Content="Percentage"/>
                        </ComboBox>
                    </StackPanel>
                    <StackPanel Margin="3" Orientation="Horizontal">
                        <TextBlock VerticalAlignment="Center" MinWidth="90">Content:</TextBlock>
                        <TextBox x:Name="txtProgressBarText" MinWidth="100">I am ProgressBar!</TextBox>
                    </StackPanel>
                    <StackPanel Margin="3" Orientation="Horizontal">
                        <TextBlock VerticalAlignment="Center" MinWidth="90">Value:</TextBlock>
                        <Slider x:Name="slider" Minimum="0" Maximum="100" MinWidth="100" Value="33"></Slider>
                    </StackPanel>
                </StackPanel>
                </StackPanel>
        </GroupBox>

      <StackPanel Grid.Row="2" Margin="10">
            <TextBlock Text="Usage:" FontSize="16" FontWeight="Bold" Foreground="DarkBlue"/>
         <TextBlock Text="When the Calculator has focus, you can use the keyboard to interact with the key pad. Click the Calculator to give focus." Margin="10,0" />
            <Control:ProgressBar ProgressBarType="{Binding ElementName=cmbProgressBarType,Path=SelectedItem.Content}" Content="{Binding ElementName=txtProgressBarText,Path=Text}" Margin="10"  Width="500" Height="22" Value="{Binding ElementName=slider,Path=Value}"/>
      </StackPanel>
   </Grid>
</sample:DemoView>
